package com.gph.saviorframework.os.authz.dao;

import com.gph.saviorframework.os.model.oauth.ClientDetails;
import org.apache.ibatis.annotations.Param;
import org.aspectj.lang.annotation.Aspect;

import java.util.List;
import java.util.Map;

@Aspect
public interface ClientDetailsDao {

    List<ClientDetails> findClientDetails(@Param("clientId") String clientId);

    List<ClientDetails> findClientDetailsListByClientId(@Param("clientId") String clientId);

    List<ClientDetails> findClientDetailsByClientIdAndResourceIds(@Param("clientId") String clientId,
                                                                  @Param("resourceIds") String resourceIds);

    void saveClientDetails(ClientDetails clientDetails);

    /**
     * 查询结果集
     * @param sort
     * @param dir
     * @param whereClause
     * @return
     */
    List<Map<String,Object>> find(
            @Param(value = "sort")String sort,
            @Param(value = "dir")String dir,
            @Param(value = "where_clause")String whereClause);
}
